package com.neuedu.his.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.neuedu.his.mapper.MedicalrecordMapper;
import com.neuedu.his.po.Medicalrecord;
import com.neuedu.his.service.MedicalrecordService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author root
 * @description 针对表【medicalrecord】的数据库操作Service实现
 * @createDate 2025-06-25 10:55:54
 */
@Service
public class MedicalrecordServiceImpl extends ServiceImpl<MedicalrecordMapper, Medicalrecord>
        implements MedicalrecordService {


    @Resource
    private MedicalrecordMapper medicalRecordMapper;

    @Override
    public Medicalrecord getById(Integer id) {
        return medicalRecordMapper.selectById(id);
    }

    @Override
    public Medicalrecord getByCaseNumber(String caseNumber) {
        return medicalRecordMapper.selectByCaseNumber(caseNumber);
    }

    @Override
    public List<Medicalrecord> getAll() {
        return medicalRecordMapper.selectAll();
    }

    @Override
    public int insert(Medicalrecord medicalRecord) {
        return medicalRecordMapper.insert(medicalRecord);
    }

    @Override
    public int update(Medicalrecord medicalRecord) {
        return medicalRecordMapper.update(medicalRecord);
    }

    @Override
    public int deleteById(Integer id) {
        return medicalRecordMapper.deleteById(id);
    }
}





